import request from '@/utils/request'

export function getSettlements(query) {
  return request({
    url: '/market/settlement/getList',
    method: 'post',
    data: query
  })
}

export function getSettlement(id) {
  return request({
    url: '/market/settlement/getDetail',
    method: 'post',
    data: id
  })
}

export function saveSettlement(formdata) {
  return request({
    url: '/market/settlement/save',
    method: 'post',
    data: formdata
  })
}
export function changeStatusBySettlementID(id) {
  return request({
    url: '/market/settlement/change-status',
    method: 'post',
    data: id
  })
}

export function removeSettlementByID(id) {
  return request({
    url: '/market/settlement/remove',
    method: 'post',
    data: id
  })
}

export function deleteSettlementByID(id) {
  return request({
    url: '/market/settlement/delete',
    method: 'post',
    data: id
  })
}

export function fetchSettlementAvailable() {
  return request({
    url: '/market/settlement/getAvailable',
    method: 'post'
  })
}

